import java.util.ArrayList;
import java.util.List;

/**
 * @author zyj
 * @date 2022年05月17日 14:46
 * T E K  V
 */
public class Apple<T> {
    private T name;

    public T getName() {
        return name;
    }

    public void setName(T name) {
        this.name = name;
    }

    public void add(List<Object> list){

    }


    /**
     * 泛型方法
     */

    public <E> E f(E t){
        return t;
    }

    public static void main(String[] args) {
        Apple<String> apple = new Apple<String>();
        apple.setName("");
        System.out.println(apple.f(new String("占山")));
        Apple<Student> apple1 = new Apple<Student>();

        System.out.println(apple.f(new Student()));
    }
}

class Student{

}
